package com.example.utils;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author cjd
 * @date 2024/01/30 21:02
 */
public class WebUtil {
    public static String renderString(HttpServletResponse response, String content) {
        try {
            response.setStatus(200);
            response.setCharacterEncoding("UTF-8");
            response.setContentType("application/json");
            response.getWriter().print(content);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
}
